package tat.domain;

import java.util.Observable;

import tat2.TATUseCase;

public class TatUseCase extends Observable{

    private String name;

    public TatUseCase(final String ucName) {
        this.name = ucName;
    }

    public TatUseCase(TATUseCase legacyUC) {
    	this.name = legacyUC.getName();
	}

	public String name() {
        return this.name;
    }
	
	public void changeName(String newName){
		this.name = newName;
		this.setChanged();
    	this.notifyObservers();
	}
    
    public String toString() {
        return "\t" + name + "\n";
    }

    public String toXML() {
        return "\t<use-case>" + name + "</use-case>\n";
    }

}
